package com.android.locationapi.maps;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class AddFriend extends Activity{
	
	private EditText name;
	private EditText email;
	protected void onCreate(Bundle bundle) {
		super.onCreate(bundle);
		
		setContentView(R.layout.addfriend);
		
		name = (EditText) findViewById(R.id.nameTextBox);
		email = (EditText) findViewById(R.id.eMailTextBox);
		
		Button saveButton = (Button) findViewById(R.id.saveButton);
		saveButton.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Server server = new Server();
				int returnCode = server.AddFriend(name.getText().toString(), 
						email.getText().toString());
				if(returnCode==1)
				{
					//Toast name is null
				}
				if(returnCode==2)
				{
					//Toast email is null
				}
				if(returnCode==3)
				{
					//Toast friend already exists
				}
				if(returnCode==0)
				{
					//Toast friend added successfully
				}
			}
		});
		
		
	}

	
}
